﻿using System;
using System.Runtime.InteropServices;

namespace Com.Lancetinc.Evs
{
    public static class NativeMethods
    {
        #region Constants
        public const int HWND_BROADCAST = 0xffff;
        #endregion

        #region Dll Imports

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern IntPtr SendMessage(IntPtr hWnd, Int32 Msg, IntPtr wParam, IntPtr lParam);

        [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
        public static extern uint RegisterWindowMessage(string lpString);

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern IntPtr PostMessage(IntPtr hWnd, Int32 Msg, IntPtr wParam, IntPtr lParam);

        [DllImport("kernel32.dll")]
        public static extern int Beep(int dwFreq, int dwDuration);
        #endregion
    }
}
